<div id="hl-header">
    <div id="hl-top">
    	<div id="hl-logo">
        	<img src="<?php echo HTTP_SERVER.DIR_IMAGE?>logo.png" />
        </div>
        <div id="hl-top-flash">
        	<img id="item0" class="hl-top-flash-item" src="<?php echo HTTP_SERVER.DIR_IMAGE?>hinh1.png" />
            <img id="item1" class="hl-top-flash-item" src="<?php echo HTTP_SERVER.DIR_IMAGE?>hinh2.png" />
            <img id="item2" class="hl-top-flash-item" src="<?php echo HTTP_SERVER.DIR_IMAGE?>hinh3.png" />
            
        </div>
        <div class="hl-header-tool">
        	<table>
            	<tr>
                	<td><a href="<?php echo $this->document->createLink('cart');?>"><img src="<?php echo HTTP_SERVER.DIR_IMAGE?>icon-cart.png" /></a></td>
                    <td><a href="<?php echo $this->document->createLink('cart');?>">Giỏ hàng:</a> <strong id="cartcout"></strong> Sản phẩm</td>
                    <?php if(!$this->member->isLogged()){?>
                    <td><a href="<?php echo $this->document->createLink('login');?>">Đăng nhập</a></td>
                    <td><a href="<?php echo $this->document->createLink('register');?>">Đăng ký</a></td>
                    <?php }else{ ?>
                    <td><a href="<?php echo $this->document->createLink('member')?>"><?php echo $this->document->getUser($this->member->getUserName())?></a></td>
                    <td><a href="#" onclick="logout()">Đăng xuất</a></TD>
                    <?php }?>
                </tr>
            </table>
        </div>
        
        <div class="hl-navigation">
    
            <ul id="hl-main-nav">
                <?php echo $mainmenu?>
            </ul>
    
            <div class="clearer">&nbsp;</div>
    
        </div>
        
    </div>
    <div class="hl-header-share">
        <a id="header-facbook" href="http://www.facebook.com/sharer/sharer.php?u=<?php echo $curentlink?>" target="_blank">
            <img src="<?php echo HTTP_SERVER.DIR_IMAGE?>facebook.gif" />
        </a>
        <a id="header-twitter" href="https://twitter.com/intent/tweet?source=webclient&text=<?php echo $this->document->title?>-<?php echo $curentlink?>" target="_blank">
            <img src="<?php echo HTTP_SERVER.DIR_IMAGE?>twitter.gif" />
        </a>
    </div>
</div>

<script src="<?php echo HTTP_SERVER.DIR_JS?>menu.js" language="javascript"></script>
<script language="javascript">

function FlashTop()
{
	this.index = 0;
	this.pmax = 2;
	this.show = function(pos)
	{
		$('#item'+pos).fadeIn('slow');	
	}
	
	this.run = function()
	{
		$('.hl-top-flash-item').fadeOut('slow');
		if(objF.index > objF.pmax)
			objF.index = 0;	
		objF.show(objF.index++);
		setTimeout("objF.run()",3000);
	}
}
var objF = new FlashTop();
objF.index = 0;
objF.run();

</script>